package com.health.healthproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.health.healthproject.dto.ServiceRecordDTO;
import com.health.healthproject.entity.ServiceRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 服务记录Mapper接口
 */
@Mapper
public interface ServiceRecordMapper extends BaseMapper<ServiceRecord> {

    /**
     * 根据ID查询服务记录详情（包含所有关联用户的姓名）
     */
    ServiceRecordDTO getServiceRecordDetail(@Param("id") Long id);

    /**
     * 分页查询服务记录（包含所有关联用户的姓名）
     */
    Page<ServiceRecordDTO> pageServiceRecordList(Page<ServiceRecordDTO> page, @Param("query") ServiceRecord query,@Param("startDate") String startDate,@Param("endDate") String endDate);
}